<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			//构造函数就是初始化一个实例对象,对象的prototype属性是继承一个实例对象
			function Fun(name,age,sex,friend,speak){
				this.name = name;
				this.age = age;
				this.sex = sex;
				this.friend = friend;
				this.speak = speak;
				this.say = function(){
					console.log("\n"+"他的名字叫:"+this.name+"\n"+"今年:"+this.age+"岁"+"\n"+"性别:"+this.sex+"\n"+this.friend+"男朋友"+"\n"+"男朋友 说:"+this.speak)
				}
			}
			var fun = new Fun("小明",18,"男","有","我们分手吧！我已经有新男票了")
			fun.say()
		</script>
	</body>
</html>
